package myschool.dao;


import myschool.entity.Subject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SubjectDao {
    //int add(Subject s);
    int add(@Param("sub") Subject s);
    int update(Subject s);
    int updateHours(@Param(value = "id") long id, @Param("hours") int hours);
    int del(Long id);

    Subject get(Long id);

    //List<Subject> findALL();

    List<Subject> paging(@Param("pageNo") int pageNo, @Param("pageSize") int pageSize,@Param("sname") String sname);


    int findTotal(@Param("sname")String sname);

    //判断课程是否已经存在
    int checkName(String name);
}
